package io.github.common.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import io.github.common.enums.Deleted;
import lombok.Data;

import java.util.Date;

/**
 * 数据库po基类
 *
 * @author haijun
 * @version 1.0.0
 * @email "1424132610@qq.com"
 * @date 2024.10.19 11:25
 * @since 1.0.0
 */
@Data
public abstract class AbstractPo {

    /**
     * Id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * Create time
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime = new Date();

    /**
     * Update time
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime = new Date();

    /**
     * Deleted
     */
    @TableLogic
    private Deleted deleted;

}
